/*
 * Background Flickr: Copyright (C) 2009  Craig McNicholas
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

package com.ddw.app.bflickr.logging;

/**
 * Custom logging class to provide debugging feedback
 * @author craig
 *
 */
public class Log {
	
	private String tag;
	
	/**
	 * Constructs a new log instance
	 * @param tag the tag to use for log filtering
	 */
	public Log(String tag) {
		this.tag = tag;
		android.util.Log.d(tag, "New log instance created.");
	}
	
	/**
	 * Outputs a log debug message
	 * @param message the message to output
	 */
	public void debug(String message) {
		android.util.Log.d(this.tag, message);
	}
	
	/**
	 * Outputs a log debug message
	 * @param message the message to output
	 * @param throwable the throwable to log
	 */
	public void debug(String message, Throwable throwable) {
		android.util.Log.d(this.tag, message, throwable);
	}
	
	/**
	 * Outputs a log error message
	 * @param message the message to output
	 */
	public void error(String message) {
		android.util.Log.e(this.tag, message);
	}
	
	/**
	 * Outputs a log error message
	 * @param message the message to output
	 * @param throwable the throwable to log
	 */
	public void error(String message, Throwable throwable) {
		android.util.Log.e(this.tag, message, throwable);
	}
	
	/**
	 * Outputs a log warning message
	 * @param message the message to output
	 */
	public void warn(String message) {
		android.util.Log.w(this.tag, message);
	}
	
	/**
	 * Outputs a log warning message
	 * @param message the message to output
	 * @param throwable the throwable to log
	 */
	public void warn(String message, Throwable throwable) {
		android.util.Log.w(this.tag, message, throwable);
	}
	
}
